package com.yuke.cloud.service.uac.service;

import com.github.pagehelper.PageInfo;
import com.yuke.cloud.common.base.dto.LoginAuthDto;
import com.yuke.cloud.service.uac.dto.RoleMainQueryDto;
import com.yuke.cloud.service.uac.entity.AccRole;
import com.yuke.cloud.common.core.support.IService;

import java.util.List;


/**
 * Created by wg on 2018/11/05.
 */
public interface AccRoleService extends IService<AccRole> {

    /**
     * Query role list with page list.
     *
     * @param role the role
     *
     * @return the list
     */
    PageInfo queryRoleListWithPage(RoleMainQueryDto role);

    /**
     * 根据角色删除用户.
     *
     * @param id the id
     *
     * @return the int
     */
    int deleteRoleById(Long id);

    /**
     * Batch delete by id list int.
     *
     * @param idList the id list
     */
    void batchDeleteByIdList(List<Long> idList);

    /**
     * 保存角色.
     *
     * @param role         the role
     * @param loginAuthDto the login auth dto
     *
     * @return the int
     */
    int saveRole(AccRole role, LoginAuthDto loginAuthDto);

    AccRole getRoleById(Long roleId);

    /**
     * Find all role info by user id list.
     *
     * @param userId the user id
     *
     * @return the list
     */
    List<AccRole> findAllRoleInfoByUserId(Long userId);
}
